namespace Expect.Documentation.Base_concepts
{
    using System;
    using Expect.Core;
    using Expect.Core.Fixtures;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    
    // This file is generated, if you modify content you will lose your modifications when the generator will regenerate the file
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Expect.Core", "0.5.2.0")]
    [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [TestClass()]
    [SpecificationContainerAttribute(Name="Specifications containers and fixtures", Path="\\Base concepts\\Specifications containers and fixtures.expect")]
    public partial class SpecificationsContainersAndFixturesContainer : Expect.Core.AbstractSpecificationContainer
    {
        
        partial void PrepareContextExtension();
        
        partial void BeforeInitExtension();
        
        partial void AfterInitExtension();
        
        partial void BeforeTeardownExtension();
        
        partial void AfterTeardownExtension();
        
#line 1 "Specifications containers and fixtures.expect"
#line hidden
        
        public override void InitializeContext()
        {
            base.InitializeContext();
            PrepareContextExtension();
        }
        
        [TestInitialize()]
        public virtual void SpecificationsContainersAndFixturesClass_TestInit()
        {
            InitializeContext();
            BeforeInit();
            BeforeInitExtension();

            SpecificationDefinition spec = new SpecificationDefinition();
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }

            AfterInit();
            AfterInitExtension();
        }
        
        [TestCleanup()]
        public virtual void SpecificationsContainersAndFixturesClass_TestTeardown()
        {
            BeforeTeardown();
            BeforeTeardownExtension();

            SpecificationDefinition spec = new SpecificationDefinition();
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }

            AfterTeardown();
            AfterTeardownExtension();
        }
        
        // TestComment
        [TestMethod()]
        public virtual void SpecificationsContainersAndFixtures()
        {
            SpecificationDefinition spec = new SpecificationDefinition();
            Get_SpecificationsContainersAndFixtures(spec);
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }
        }
        
        [SpecificationProviderAttribute(Name="Specifications containers and fixtures")]
        public virtual void Get_SpecificationsContainersAndFixtures(Expect.Core.SpecificationDefinition spec)
        {
            spec.Context = Context;
            spec.Name = "Specifications containers and fixtures";
            FixtureDefinition fixture = null;

            fixture = spec.AddFixture<DescriptionFixture>();
#line 1
            fixture.WithRow("With Expect, you write a specifications in a natural language. In opposition to B" +
                    "DD tools, you don\'t have constraint on the syntax you use.");
#line 2
            fixture.WithRow("Your specifications are wrapped into unit tests that you could run with your favo" +
                    "rite unit test framework. In Expect terminology, classes holding the specificati" +
                    "ons/unit-tests are called \"Containers\".");
#line 3
            fixture.WithRow("To make your specification executable, you need to definie bridges between the te" +
                    "xt elements and the code you want to test. Those bridges are called \"Fixtures\".");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 5
            fixture.WithRow("Fixtures are blocs of text separated by blank lines, the following example show t" +
                    "wo distinct fixtures:");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 7
            fixture.WithRow("This is a first fixture");
#line 8
            fixture.WithRow("On multiple lines");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 10
            fixture.WithRow("This is a second fixture");
#line 11
            fixture.WithRow("Also on multiple lines");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 13
            fixture.WithRow("To be able to have composition on your specs, you could use parameters or tokens " +
                    "in your fixtures.");
#line 14
            fixture.WithRow("Fixtures are tokenized using pipe characters : \"|\"");
#line 15
            fixture.WithRow("!For example :!");
#line 16
            fixture.WithRow("{{");
#line 17
            fixture.WithRow(" I love |scuba diving| and |apple pies| very much");
#line 18
            fixture.WithRow("}}");
#line 19
            fixture.WithRow("The tokens are then interpreted alternatively as name and parameters.");
#line 20
            fixture.WithRow("!The above example gives the following :!");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 21
            fixture.WithRow("I love", "scuba diving", "and", "apple pies", "very much");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 25
            fixture.WithRow("Expect try to be very flexible in the way you map specifications to your code.");
#line 26
            fixture.WithRow("Fixtures could be classes or methods, and methods can be defined in several place" +
                    "s, like the container or the specification class (you will read more on specific" +
                    "ation class later).");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 28
            fixture.WithRow("The following diagram illustrate how Expect try to resolve fixtures. The differen" +
                    "t parts are detailed in the next chapters.");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<ImageDescriptionFixture>();
#line 29
            fixture.WithRow("images\\ResolutionProcess.png");
#line hidden
            fixture.EndRun();

        }
    }
}
